
// line 1 "./ragel/sar_output.rl"
/*
 * @LANG: java
 */
 
package com.blogspot.radialmind;

class SarTextOutputParser
{
	
// line 91 "./ragel/sar_output.rl"


	
// line 17 "./src/main/java/com/blogspot/radialmind/SarTextOutputParser.java"
private static byte[] init__SarTextOutputParser_actions_0()
{
	return new byte [] {
	    0,    1,    0,    1,    5,    1,    6,    1,    7,    1,    8,    1,
	    9,    1,   10,    1,   11,    1,   12,    2,    6,    1,    2,    6,
	    2,    2,    6,    9,    2,   10,    6,    2,   10,    8,    2,   11,
	    3,    2,   11,    4,    2,   12,    3,    2,   12,    4
	};
}

private static final byte _SarTextOutputParser_actions[] = init__SarTextOutputParser_actions_0();


private static short[] init__SarTextOutputParser_key_offsets_0()
{
	return new short [] {
	    0,    0,   10,   16,   22,   28,   31,   37,   43,   46,   48,   53,
	   55,   58,   61,   63,   66,   69,   71,   75,   78,   86,   93,  100,
	  103,  106,  108,  113,  116,  117,  118,  119,  120,  128,  131,  132,
	  134,  142,  145,  147,  155,  164,  173,  181,  190,  199,  207,  215,
	  223,  231,  242,  248,  254,  257,  259,  264,  270,  276,  284,  295,
	  301,  309,  316,  321,  326,  331,  337,  343,  351,  359,  370,  376,
	  384,  391,  396,  401,  406,  412,  420,  428,  431,  434,  436,  439,
	  442,  444,  448,  452,  456,  467,  474,  481,  488,  495,  502,  509,
	  516,  522,  528,  534,  541,  544,  546,  551,  557,  563
	};
}

private static final short _SarTextOutputParser_key_offsets[] = init__SarTextOutputParser_key_offsets_0();


private static char[] init__SarTextOutputParser_trans_keys_0()
{
	return new char [] {
	    9,   32,   34,   45,   46,   65,   40,   41,   48,   57,    9,   10,
	   32,   34,   40,   41,    9,   10,   32,   34,   40,   41,    9,   10,
	   32,   34,   40,   41,    9,   32,   40,    9,   10,   32,   34,   40,
	   41,    9,   10,   32,   34,   40,   41,    9,   32,   41,    9,   32,
	    9,   32,   45,   48,   57,   48,   57,   47,   48,   57,   45,   48,
	   57,   48,   57,   47,   48,   57,   45,   48,   57,   48,   57,    9,
	   32,   48,   57,    9,   32,   95,    9,   32,   34,   46,   40,   41,
	   48,   57,   32,   34,   95,    9,   10,   40,   41,    9,   10,   32,
	   34,   95,   40,   41,    9,   32,   40,   45,   48,   57,   48,   57,
	    9,   32,   67,   48,   57,    9,   32,   67,   80,   85,   41,   10,
	    9,   32,   34,   46,   40,   41,   48,   57,   34,   40,   41,   95,
	    9,   32,    9,   32,   34,   46,   40,   41,   48,   57,   34,   40,
	   41,    9,   32,    9,   10,   32,   34,   40,   41,   48,   57,    9,
	   10,   32,   34,   58,   40,   41,   48,   57,    9,   10,   32,   34,
	   45,   40,   41,   48,   57,    9,   10,   32,   34,   40,   41,   48,
	   57,    9,   10,   32,   34,   58,   40,   41,   48,   57,    9,   10,
	   32,   34,   45,   40,   41,   48,   57,    9,   10,   32,   34,   40,
	   41,   48,   57,    9,   10,   32,   34,   40,   41,   48,   57,    9,
	   10,   32,   34,   40,   41,   65,   90,    9,   10,   32,   34,   40,
	   41,   65,   90,    9,   10,   32,   34,   37,   40,   41,   65,   90,
	   97,  122,    9,   10,   32,   34,   40,   41,    9,   32,   45,   46,
	   48,   57,   46,   48,   57,   48,   57,    9,   10,   32,   48,   57,
	    9,   10,   32,   46,   48,   57,    9,   10,   32,   34,   40,   41,
	    9,   10,   32,   34,   40,   41,   65,   90,    9,   32,   37,   45,
	   46,   48,   57,   65,   90,   97,  122,   32,   34,    9,   10,   40,
	   41,    9,   10,   32,   34,   40,   41,   65,   90,    9,   32,   37,
	   65,   90,   97,  122,   32,    9,   10,   65,   90,    9,   10,   32,
	   65,   90,   32,    9,   10,   65,   90,    9,   10,   32,   34,   40,
	   41,    9,   10,   32,   34,   40,   41,    9,   10,   32,   34,   40,
	   41,   65,   90,    9,   10,   32,   34,   40,   41,   65,   90,    9,
	   32,   37,   45,   46,   48,   57,   65,   90,   97,  122,   32,   34,
	    9,   10,   40,   41,    9,   10,   32,   34,   40,   41,   65,   90,
	    9,   32,   37,   65,   90,   97,  122,   32,    9,   10,   65,   90,
	    9,   10,   32,   65,   90,   32,    9,   10,   65,   90,    9,   10,
	   32,   34,   40,   41,    9,   10,   32,   34,   40,   41,   65,   90,
	    9,   10,   32,   34,   40,   41,   65,   90,   58,   48,   57,   45,
	   48,   57,   48,   57,   58,   48,   57,   45,   48,   57,   48,   57,
	    9,   32,   48,   57,    9,   32,   65,   90,    9,   32,   65,   90,
	    9,   10,   32,   34,   37,   40,   41,   65,   90,   97,  122,    9,
	   10,   32,   34,  118,   40,   41,    9,   10,   32,   34,  101,   40,
	   41,    9,   10,   32,   34,  114,   40,   41,    9,   10,   32,   34,
	   97,   40,   41,    9,   10,   32,   34,  103,   40,   41,    9,   10,
	   32,   34,  101,   40,   41,    9,   10,   32,   34,   58,   40,   41,
	    9,   10,   32,   34,   40,   41,    9,   10,   32,   34,   40,   41,
	    9,   10,   32,   34,   40,   41,    9,   32,   40,   45,   46,   48,
	   57,   46,   48,   57,   48,   57,    9,   10,   32,   48,   57,    9,
	   32,   45,   46,   48,   57,    9,   10,   32,   46,   48,   57,    0
	};
}

private static final char _SarTextOutputParser_trans_keys[] = init__SarTextOutputParser_trans_keys_0();


private static byte[] init__SarTextOutputParser_single_lengths_0()
{
	return new byte [] {
	    0,    6,    4,    4,    4,    3,    4,    6,    3,    2,    3,    0,
	    1,    1,    0,    1,    1,    0,    2,    3,    4,    3,    5,    3,
	    1,    0,    3,    3,    1,    1,    1,    1,    4,    1,    1,    2,
	    4,    1,    2,    4,    5,    5,    4,    5,    5,    4,    4,    4,
	    4,    7,    4,    4,    1,    0,    3,    4,    4,    4,    5,    2,
	    4,    3,    1,    3,    1,    4,    4,    4,    4,    5,    2,    4,
	    3,    1,    3,    1,    4,    4,    4,    1,    1,    0,    1,    1,
	    0,    2,    2,    2,    5,    5,    5,    5,    5,    5,    5,    5,
	    4,    4,    4,    5,    1,    0,    3,    4,    4,    0
	};
}

private static final byte _SarTextOutputParser_single_lengths[] = init__SarTextOutputParser_single_lengths_0();


private static byte[] init__SarTextOutputParser_range_lengths_0()
{
	return new byte [] {
	    0,    2,    1,    1,    1,    0,    1,    0,    0,    0,    1,    1,
	    1,    1,    1,    1,    1,    1,    1,    0,    2,    2,    1,    0,
	    1,    1,    1,    0,    0,    0,    0,    0,    2,    1,    0,    0,
	    2,    1,    0,    2,    2,    2,    2,    2,    2,    2,    2,    2,
	    2,    2,    1,    1,    1,    1,    1,    1,    1,    2,    3,    2,
	    2,    2,    2,    1,    2,    1,    1,    2,    2,    3,    2,    2,
	    2,    2,    1,    2,    1,    2,    2,    1,    1,    1,    1,    1,
	    1,    1,    1,    1,    3,    1,    1,    1,    1,    1,    1,    1,
	    1,    1,    1,    1,    1,    1,    1,    1,    1,    0
	};
}

private static final byte _SarTextOutputParser_range_lengths[] = init__SarTextOutputParser_range_lengths_0();


private static short[] init__SarTextOutputParser_index_offsets_0()
{
	return new short [] {
	    0,    0,    9,   15,   21,   27,   31,   37,   44,   48,   51,   56,
	   58,   61,   64,   66,   69,   72,   74,   78,   82,   89,   95,  102,
	  106,  109,  111,  116,  120,  122,  124,  126,  128,  135,  138,  140,
	  143,  150,  153,  156,  163,  171,  179,  186,  194,  202,  209,  216,
	  223,  230,  240,  246,  252,  255,  257,  262,  268,  274,  281,  290,
	  295,  302,  308,  312,  317,  321,  327,  333,  340,  347,  356,  361,
	  368,  374,  378,  383,  387,  393,  400,  407,  410,  413,  415,  418,
	  421,  423,  427,  431,  435,  444,  451,  458,  465,  472,  479,  486,
	  493,  499,  505,  511,  518,  521,  523,  528,  534,  540
	};
}

private static final short _SarTextOutputParser_index_offsets[] = init__SarTextOutputParser_index_offsets_0();


private static byte[] init__SarTextOutputParser_trans_targs_0()
{
	return new byte [] {
	    0,    0,   36,   39,    0,   89,    0,   79,    2,    3,    0,    3,
	    0,    0,    2,    3,    0,    3,    0,    0,    4,    5,    0,    5,
	    0,    0,    4,    5,    5,    6,    0,    6,    0,    6,    0,    0,
	    7,    8,    0,    8,    0,    0,    9,    7,    8,    8,    9,    0,
	   10,   10,    0,   10,   10,   11,   12,    0,   12,    0,   13,   12,
	    0,   14,   15,    0,   15,    0,   16,   15,    0,   17,   18,    0,
	   18,    0,   19,   19,   18,    0,   19,   19,   20,    0,    0,    0,
	   32,    0,    0,    0,   21,    0,    0,   22,    0,    0,   21,   23,
	    0,   23,    0,   22,    0,   21,   23,   23,   24,    0,   25,   26,
	    0,   26,    0,   27,   27,   28,   26,    0,   27,   27,   28,    0,
	   29,    0,   30,    0,   31,    0,  105,    0,   32,   32,    0,    0,
	    0,    0,   33,   34,    0,   33,   35,    0,   23,   23,    0,   36,
	   36,    0,    0,    0,    0,   37,   38,    0,   37,    3,    3,    0,
	    3,    0,    3,    0,    0,   40,    2,    3,    0,    3,    0,   41,
	    0,   40,    2,    3,    0,    3,    0,   42,    0,   43,    2,    3,
	    0,    3,    0,    0,   43,    2,    3,    0,    3,    0,   44,    0,
	   43,    2,    3,    0,    3,    0,   45,    0,   46,    2,    3,    0,
	    3,    0,    0,   46,    2,   47,    0,   47,    0,    0,   46,    2,
	   47,    0,   47,    0,    0,   48,    4,   49,    0,   49,    0,    0,
	   48,    4,   49,    0,   49,    0,   56,    6,    0,   67,   56,   50,
	   51,    0,   51,    0,    0,   50,   51,   51,   52,   53,   55,    0,
	   53,   55,    0,   54,    0,   51,  105,   51,   54,    0,   51,  105,
	   51,   54,   55,    0,   51,    0,   51,   63,   63,   57,   58,  105,
	   58,   63,   63,   66,   57,   58,   58,   59,   52,   53,   55,   62,
	   59,    0,    0,   63,    0,   63,   60,   61,  105,   61,   63,   63,
	   65,   60,   61,   61,   59,   62,   59,    0,    0,    0,   64,   63,
	   61,  105,   61,    0,   63,    0,    0,    0,   63,   61,  105,   61,
	    0,    0,   65,   58,  105,   58,    0,    0,   66,   69,    0,   69,
	   63,   63,   77,   68,   58,  105,   58,   63,   63,   50,   68,   69,
	   69,   70,   52,   53,   55,   73,   70,    0,    0,   74,    0,   74,
	   71,   72,  105,   72,   74,   74,   76,   71,   72,   72,   70,   73,
	   70,    0,    0,    0,   75,   74,   72,  105,   72,    0,   74,    0,
	    0,    0,   74,   72,  105,   72,    0,    0,   76,   69,    0,   69,
	   63,   63,   78,   68,   69,    0,   69,    0,    0,   78,   50,   80,
	   79,    0,   81,   82,    0,   82,    0,   83,   82,    0,   84,   85,
	    0,   85,    0,   86,   86,   85,    0,   86,   86,   87,    0,   88,
	   88,   87,    0,   88,    0,   88,    0,   56,    0,   67,   56,   50,
	    3,    0,    3,    0,   90,    0,    2,    3,    0,    3,    0,   91,
	    0,    2,    3,    0,    3,    0,   92,    0,    2,    3,    0,    3,
	    0,   93,    0,    2,    3,    0,    3,    0,   94,    0,    2,    3,
	    0,    3,    0,   95,    0,    2,    3,    0,    3,    0,   96,    0,
	    2,   97,    0,   97,    0,    0,    2,   97,    0,   97,    0,    0,
	   98,   99,    0,   99,    0,    0,   98,   99,   99,    6,  100,  101,
	  104,    0,  101,  104,    0,  102,    0,  103,  105,  103,  102,    0,
	  103,  103,  100,  101,  104,    0,  103,  105,  103,  102,  104,    0,
	    0,    0
	};
}

private static final byte _SarTextOutputParser_trans_targs[] = init__SarTextOutputParser_trans_targs_0();


private static byte[] init__SarTextOutputParser_trans_actions_0()
{
	return new byte [] {
	    0,    0,    0,    3,    0,    3,    0,    3,    3,    5,    0,    5,
	    0,    0,    3,    0,    0,    0,    0,    0,    3,   13,    0,   13,
	    0,    0,    3,    0,    0,    0,    0,    0,    0,    0,    0,    0,
	    3,   13,    0,   13,    0,    0,   13,    3,    0,    0,    0,    0,
	    0,    0,    0,    0,    0,    3,    3,    0,    3,    0,    3,    3,
	    0,    3,    3,    0,    3,    0,    3,    3,    0,    3,    3,    0,
	    3,    0,    7,    7,    3,    0,    0,    0,    0,    0,    0,    0,
	    0,    0,    0,    0,    3,    0,    0,    3,    0,    0,    3,    5,
	    0,    5,    0,    3,    0,    3,    0,    0,    0,    0,    3,    3,
	    0,    3,    0,   17,   17,   17,    3,    0,    0,    0,    0,    0,
	    0,    0,    0,    0,    0,    0,    1,    0,    3,    3,    0,    0,
	    0,    0,    3,    0,    0,    3,    0,    0,    5,    5,    0,    3,
	    3,    0,    0,    0,    0,    3,    0,    0,    3,    5,    5,    0,
	    5,    0,    5,    0,    0,    3,    3,    5,    0,    5,    0,    3,
	    0,    3,    3,    5,    0,    5,    0,    3,    0,    3,    3,    5,
	    0,    5,    0,    0,    3,    3,    5,    0,    5,    0,    3,    0,
	    3,    3,    5,    0,    5,    0,    3,    0,    3,    3,    5,    0,
	    5,    0,    0,    3,    3,   25,    0,   25,    0,    0,    3,    3,
	    0,    0,    0,    0,    0,    3,    3,   31,    0,   31,    0,    0,
	    3,    3,    0,    0,    0,    0,    3,    0,    0,    3,    3,    3,
	    5,    0,    5,    0,    0,    3,    0,    0,    3,    3,    3,    0,
	    3,    3,    0,    3,    0,   15,   34,   15,    3,    0,   17,   40,
	   17,    3,    3,    0,    5,    0,    5,    3,    3,    3,    5,   22,
	    5,    3,    3,    3,    3,    0,    0,    3,    3,    3,    3,    3,
	    3,    0,    0,    3,    0,    3,    3,    5,   22,    5,    3,    3,
	    3,    3,    0,    0,    3,    3,    3,    0,    0,    0,    3,    3,
	    5,   22,    5,    0,    3,    0,    0,    0,    3,    5,   22,    5,
	    0,    0,    3,    5,   22,    5,    0,    0,    3,    5,    0,    5,
	    3,    3,    3,    3,    5,   22,    5,    3,    3,    3,    3,    0,
	    0,    3,    3,    3,    3,    3,    3,    0,    0,    3,    0,    3,
	    3,    5,   19,    5,    3,    3,    3,    3,    0,    0,    3,    3,
	    3,    0,    0,    0,    3,    3,    5,   19,    5,    0,    3,    0,
	    0,    0,    3,    5,   19,    5,    0,    0,    3,    5,    0,    5,
	    3,    3,    3,    3,    5,    0,    5,    0,    0,    3,    3,    3,
	    3,    0,    3,    3,    0,    3,    0,    3,    3,    0,    3,    3,
	    0,    3,    0,   11,   11,    3,    0,    0,    0,    3,    0,    9,
	    9,    3,    0,    0,    0,    0,    0,    3,    0,    3,    3,    3,
	    5,    0,    5,    0,    3,    0,    3,    5,    0,    5,    0,    3,
	    0,    3,    5,    0,    5,    0,    3,    0,    3,    5,    0,    5,
	    0,    3,    0,    3,    5,    0,    5,    0,    3,    0,    3,    5,
	    0,    5,    0,    3,    0,    3,    5,    0,    5,    0,    3,    0,
	    3,    5,    0,    5,    0,    0,    3,    0,    0,    0,    0,    0,
	    3,   28,    0,   28,    0,    0,    3,    0,    0,    0,    3,    3,
	    3,    0,    3,    3,    0,    3,    0,   15,   37,   15,    3,    0,
	    0,    0,    3,    3,    3,    0,   17,   43,   17,    3,    3,    0,
	    0,    0
	};
}

private static final byte _SarTextOutputParser_trans_actions[] = init__SarTextOutputParser_trans_actions_0();


static final int SarTextOutputParser_start = 1;
static final int SarTextOutputParser_first_final = 105;
static final int SarTextOutputParser_error = 0;

static final int SarTextOutputParser_en_main = 1;


// line 94 "./ragel/sar_output.rl"

	public boolean parse( GenerateSarReport sarReport, char data[] )
	{
		int cs, p = 0, pe = data.length;
		int top = 0;
		int stack[] = new int[ 16384 ];
		
		
// line 285 "./src/main/java/com/blogspot/radialmind/SarTextOutputParser.java"
	{
	cs = SarTextOutputParser_start;
	}

// line 102 "./ragel/sar_output.rl"
		
// line 292 "./src/main/java/com/blogspot/radialmind/SarTextOutputParser.java"
	{
	int _klen;
	int _trans = 0;
	int _acts;
	int _nacts;
	int _keys;
	int _goto_targ = 0;

	_goto: while (true) {
	switch ( _goto_targ ) {
	case 0:
	if ( p == pe ) {
		_goto_targ = 4;
		continue _goto;
	}
	if ( cs == 0 ) {
		_goto_targ = 5;
		continue _goto;
	}
case 1:
	_match: do {
	_keys = _SarTextOutputParser_key_offsets[cs];
	_trans = _SarTextOutputParser_index_offsets[cs];
	_klen = _SarTextOutputParser_single_lengths[cs];
	if ( _klen > 0 ) {
		int _lower = _keys;
		int _mid;
		int _upper = _keys + _klen - 1;
		while (true) {
			if ( _upper < _lower )
				break;

			_mid = _lower + ((_upper-_lower) >> 1);
			if ( data[p] < _SarTextOutputParser_trans_keys[_mid] )
				_upper = _mid - 1;
			else if ( data[p] > _SarTextOutputParser_trans_keys[_mid] )
				_lower = _mid + 1;
			else {
				_trans += (_mid - _keys);
				break _match;
			}
		}
		_keys += _klen;
		_trans += _klen;
	}

	_klen = _SarTextOutputParser_range_lengths[cs];
	if ( _klen > 0 ) {
		int _lower = _keys;
		int _mid;
		int _upper = _keys + (_klen<<1) - 2;
		while (true) {
			if ( _upper < _lower )
				break;

			_mid = _lower + (((_upper-_lower) >> 1) & ~1);
			if ( data[p] < _SarTextOutputParser_trans_keys[_mid] )
				_upper = _mid - 2;
			else if ( data[p] > _SarTextOutputParser_trans_keys[_mid+1] )
				_lower = _mid + 2;
			else {
				_trans += ((_mid - _keys)>>1);
				break _match;
			}
		}
		_trans += _klen;
	}
	} while (false);

	cs = _SarTextOutputParser_trans_targs[_trans];

	if ( _SarTextOutputParser_trans_actions[_trans] != 0 ) {
		_acts = _SarTextOutputParser_trans_actions[_trans];
		_nacts = (int) _SarTextOutputParser_actions[_acts++];
		while ( _nacts-- > 0 )
	{
			switch ( _SarTextOutputParser_actions[_acts++] )
			{
	case 0:
// line 12 "./ragel/sar_output.rl"
	{
			sarReport.verifyAndStoreVersions();
		}
	break;
	case 1:
// line 16 "./ragel/sar_output.rl"
	{ 
			sarReport.prepareMultiGraphHeader();
		}
	break;
	case 2:
// line 20 "./ragel/sar_output.rl"
	{ 
			sarReport.prepareNormalGraphHeader();
		}
	break;
	case 3:
// line 24 "./ragel/sar_output.rl"
	{
			sarReport.addDataLine();
		}
	break;
	case 4:
// line 28 "./ragel/sar_output.rl"
	{
			sarReport.addAverageLine();
		}
	break;
	case 5:
// line 33 "./ragel/sar_output.rl"
	{
			sarReport.appendChar( data[p] );
		}
	break;
	case 6:
// line 38 "./ragel/sar_output.rl"
	{
			sarReport.addWord();
		}
	break;
	case 7:
// line 42 "./ragel/sar_output.rl"
	{
			sarReport.addDate();
		}
	break;
	case 8:
// line 46 "./ragel/sar_output.rl"
	{
			sarReport.addPmAm();
		}
	break;
	case 9:
// line 50 "./ragel/sar_output.rl"
	{
			sarReport.addTime();
		}
	break;
	case 10:
// line 54 "./ragel/sar_output.rl"
	{
			sarReport.addWord();
		}
	break;
	case 11:
// line 58 "./ragel/sar_output.rl"
	{
			sarReport.addFloat();
		}
	break;
	case 12:
// line 62 "./ragel/sar_output.rl"
	{
			sarReport.addInteger();
		}
	break;
// line 449 "./src/main/java/com/blogspot/radialmind/SarTextOutputParser.java"
			}
		}
	}

case 2:
	if ( cs == 0 ) {
		_goto_targ = 5;
		continue _goto;
	}
	if ( ++p != pe ) {
		_goto_targ = 1;
		continue _goto;
	}
case 4:
case 5:
	}
	break; }
	}

// line 103 "./ragel/sar_output.rl"

		if (( cs >= SarTextOutputParser_first_final ) && ( top == 0 ))
			return true;
		else
			return false;
	}
}

/* _____OUTPUT_____
ACCEPT
FAIL
FAIL
*/